package cn.sf.sufinguserconsumer.service;

import cn.sf.pojo.User;
import cn.sf.sufinguserconsumer.fallback.QueryUserServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@Service
@FeignClient(name = "sufing-user-provider",fallback = QueryUserServiceFallback.class)
public interface QueryUserService {

    //登录
    @RequestMapping("/queryUserDL")
    public User queryUser(@RequestParam("userName") String userName, @RequestParam("userPassword") String userPassword);

    //邮箱登录
    @RequestMapping("/queryUserEmailDL")
    public User queryUserEmail(@RequestParam("userEmail") String userEmail, @RequestParam("userPassword") String userPassword);
    @RequestMapping("/queryIdDL")
    public User queryId(long userId);
    //注册
    @RequestMapping("/userAddDL")
    public int userAdd(@RequestBody User user);

}
